class Solution {
public:
    int winningPlayerCount(int n, vector<vector<int>>& pick) {
        vector<unordered_map<int, int>> vv(n);
        for (auto& e : pick) {
            vv[e[0]][e[1]]++;
        }
        int ret = 0;
        for (int i = 0; i < n; i++) {
            for (auto& e : vv[i])
                if (e.second > i) {
                    ret++;
                    break;
                }
        }
        return ret;
    }
};